package com.example.orderminiappapi.dao;

import com.example.orderminiappapi.bean.Notice;
import com.example.orderminiappapi.bean.SearchCondition;
import com.example.orderminiappapi.bean.Shop;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NoticeDao {
    int addNotice(Notice notice);

    List<Notice> getUnreadNotice(Shop shop);    // 获取所有未读的消息

    List<Notice> getAllNotice(SearchCondition searchCondition);     //  获取所有消息

    int getNoticeCount(SearchCondition searchCondition);     //  获取所有消息总数

    int readAllNotice(Shop shop);               //  阅读所有的未读消息
}
